//-----------------------------------------------------------------------
//<copyright file="ChiTietBienBanNhapHangBLL.cs
//Code gen by tool.
//</copyright>
//-----------------------------------------------------------------------
using System;
using PMS.Exceptions;
using System.Collections.Generic;
using PMS.DAL;
using PMS.Entity;

namespace PMS.BLL
{
	public class ChiTietBienBanNhapHangBO : BaseBO
	{
		// Interface Instant Object
		private readonly IChiTietBienBanNhapHangDAO chitietbienbannhaphangInterfaceObject = null;

		// Constructor
		public ChiTietBienBanNhapHangBO()
		{
			chitietbienbannhaphangInterfaceObject = new DAL.ServiceFactory<IChiTietBienBanNhapHangDAO>().CurrentDAL;
		}

		#region ChiTietBienBanNhapHang

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietbienbannhaphang"></param>
		public ChiTietBienBanNhapHang CreateChiTietBienBanNhapHang(ChiTietBienBanNhapHang chitietbienbannhaphang)
		{
			try
			{
				return chitietbienbannhaphangInterfaceObject.CreateChiTietBienBanNhapHang(chitietbienbannhaphang);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access CreateChiTietBienBanNhapHang Exception", ex);
			}
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietbienbannhaphang"></param>
		public void UpdateChiTietBienBanNhapHang(ChiTietBienBanNhapHang chitietbienbannhaphang)
		{
			try
			{
				chitietbienbannhaphangInterfaceObject.UpdateChiTietBienBanNhapHang(chitietbienbannhaphang);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access UpdateChiTietBienBanNhapHangException", ex);
			}
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietbienbannhaphang"></param>
		public void DeleteChiTietBienBanNhapHang(ChiTietBienBanNhapHang chitietbienbannhaphang)
		{
			try
			{
				chitietbienbannhaphangInterfaceObject.DeleteChiTietBienBanNhapHang(chitietbienbannhaphang);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access DeleteChiTietBienBanNhapHangException", ex);
			}
		}

        public void DeleteChiTietBienBanNhapHangByMaBBNH(string maBBNH)
        {
            try
            {
                chitietbienbannhaphangInterfaceObject.DeleteChiTietBienBanNhapHangByMaBBNH(maBBNH);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access DeleteChiTietBienBanNhapHangException", ex);
            }
        }

		/// <summary>
		///
		/// </summary>
		public ChiTietBienBanNhapHangs GetAllChiTietBienBanNhapHang()
		{
			try
			{
				return chitietbienbannhaphangInterfaceObject.GetAllChiTietBienBanNhapHang();
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access GetAllChiTietBienBanNhapHang Exception", ex);
			}
		}

        public ChiTietBienBanNhapHangs GetAllChiTietBienBanNhapHangByMaBBNH(string maBBNH)
        {
            try
            {
                return chitietbienbannhaphangInterfaceObject.GetAllChiTietBienBanNhapHangByMaBBNH(maBBNH);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access GetAllChiTietBienBanNhapHang Exception", ex);
            }
        }

		/// <summary>
		///
		/// </summary>
		/// <param name="maBBNH"></param>
		public ChiTietBienBanNhapHang GetChiTietBienBanNhapHangByID(string maBBNH)
		{
			try
			{
				return chitietbienbannhaphangInterfaceObject.GetChiTietBienBanNhapHangByID(maBBNH);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access GetChiTietBienBanNhapHangBy ID Exception", ex);
			}
		}

		#endregion
	}
}
